package com.bsoft.mapper.business;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;


public interface RegisterMapper {
    /**
     * 科室查询
     * @param map
     * @return
     */
    List<Map<String, Object>> listDepartment(Map<String, Object> map);


    List<Map<String, Object>> getBrdaList(Map<String, Object> req);

    List<Map<String, Object>> getBrdaGHMX(Map<String, Object> req);

    int updateBrda(Map<String, Object> map);

    Long getIPrimaryKey(@Param("bmc") String bmc);

    int updateBrdaXM(Map<String, Object> req);

    List<Map<String, Object>> getHISJCBGInfo(Map<String, Object> jcbgMap);

    void saveJCBG_HIS(Map<String, Object> saveJCBGMap);

    List<Map<String, Object>> getHISJCBGInfo_update(Map<String, Object> jcbgMap);

    int deleteEmr_Jcbg_Pacs(Map<String, Object> hisJcbgMap);

    @Select("select * from  yb_ty_js01  where mzzy=1 and fphm=#{fphm} ")
    Map<String, Object> getYB_FPHM(String fphm);

    @Select("select * from V_DZFPSC_ZYJS where fphm=#{fphm} ")
    List<Map<String, Object>> InvEBillHospitalized(String fphm);

    @Select("select * from v_payChannelDetail_zy where FPHM=#{FPHM}")
    List<Map<String, Object>> getPayChannelDetailList_zy(Map<String, Object> map);

    /**============================================只要涉及医保支付的 [医保 + 自费]===================================================*/
    @Select("select ROW_NUMBER() OVER(ORDER BY SYSTIMESTAMP)  as \"sortNo\",a.* from v_chargeDetail_zy_yb a where fphm =#{FPHM} and type=#{type}")
    List<Map<String, Object>> getChargeDetailList_zy_yb(Map<String, Object> map);

    @Select("select ROW_NUMBER() OVER(ORDER BY SYSTIMESTAMP)  as \"sortNo\",a.* from v_listDetail_zy_yb a where fphm =#{FPHM} and type=#{type}")
    List<Map<String, Object>> getListDetailList_zy_yb(Map<String, Object> map);
    /**============================================只要涉及医保支付的 [医保 + 自费]===================================================*/

    /**============================================纯自费结算 [不管本次住院是否产生的有可以进行医保报销的费用]===================================================*/

    @Select("select ROW_NUMBER() OVER(ORDER BY SYSTIMESTAMP)  as \"sortNo\",a.* from v_chargeDetail_zy_yb a where mzxh =#{MZXH}")
    List<Map<String, Object>> getChargeDetailList_zy(Map<String, Object> map);

    @Select("select ROW_NUMBER() OVER(ORDER BY SYSTIMESTAMP)  as \"sortNo\",a.* from v_listDetail_zy_yb a where mzxh =#{MZXH}")
    List<Map<String, Object>> getListDetailList_zy(Map<String, Object> map);
    /**============================================纯自费结算 [不管本次住院是否产生的有可以进行医保报销的费用]===================================================*/

    @Select("select a.\"infoNo\",a.\"infoName\",a.\"infoValue\" from v_otherInfoList_zy a where FPHM=#{FPHM}")
    List<Map<String, Object>> getOtherInfoList_zy(Map<String, Object> map);

    void wz_check_StoredProcedure(Map<Object, Object> wz_stock_check_map);

    void getMax(Map<Object, Object> wz_stock_check_map);

    @Select("select * from V_HIHIS_qrCodePay a where \"idVismed\"=#{idVismed}")
    Map<String, Object> getQrCodeParm(String idVismed);

}
